Skip to content

[3.6] bpo-34246: Use no mutable default args in smtplib (GH-8554)#9112

Merged
pablogsal merged 1 commit intopython:3.6from
pablogsal:backport-d5fbe9b-3.6
Sep 8, 2018
Merged

[3.6] bpo-34246: Use no mutable default args in smtplib (GH-8554)#9112
pablogsal merged 1 commit intopython:3.6from
pablogsal:backport-d5fbe9b-3.6

Conversation

@pablogsal
Copy link
Copy Markdown
Member

@pablogsal pablogsal commented Sep 7, 2018

Some methods of the SMTP class use mutable default arguments. Specially
send_message is affected as it mutates one of the args by appending items
to it, which has side effects on further calls..
(cherry picked from commit d5fbe9b)

Co-authored-by: Pablo Aguiar scorphus@gmail.com

https://bugs.python.org/issue34246

Some methods of the SMTP class use mutable default arguments. Specially
`send_message` is affected as it mutates one of the args by appending items
to it, which has side effects on further calls..
(cherry picked from commit d5fbe9b)

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
@pablogsal pablogsal force-pushed the backport-d5fbe9b-3.6 branch from bc6eb7c to 9fcc2ce Compare September 8, 2018 00:01
@pablogsal pablogsal merged commit eb6ab73 into python:3.6 Sep 8, 2018
@bedevere-bot
Copy link
Copy Markdown

@pablogsal: Please replace # with GH- in the commit message next time. Thanks!

@pablogsal pablogsal deleted the backport-d5fbe9b-3.6 branch September 8, 2018 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants